package com.project.service;

import com.project.dao.ExamBlankrecordMapper;
import com.project.entity.ExamBlankrecord;
import com.project.service.base.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional(rollbackFor = Exception.class)
@Service
public class ExamBlankrecordServiceImpl extends BaseService implements ExamBlankrecordService {
    @Autowired
    ExamBlankrecordMapper examBlankrecordMapper;

    @Override
    public void add(ExamBlankrecord examBlankrecord) {
        examBlankrecordMapper.insert(examBlankrecord);
    }

    @Override
    public void modify(ExamBlankrecord examBlankrecord) {
        examBlankrecordMapper.updateByanswerrecordid(examBlankrecord);
    }

    @Override
    public void delete(Integer answerrecordid) {
        examBlankrecordMapper.deletebyanswerrecordid(answerrecordid);
    }

    @Override
    public List<ExamBlankrecord> findbyAnswerrecordid(Integer answerrecordid) {
        return examBlankrecordMapper.selectByanswerrecordid(answerrecordid);
    }
}
